package cn.edu.zhku.citrusmonitor.illness.dao;

import java.sql.SQLException;
import java.util.List;

import cn.edu.zhku.citrusmonitor.domain.TbIllness;
import cn.edu.zhku.citrusmonitor.domain.TbUser;

/**
 * @author 欣裕
 * @date 2018年8月2日
 * 
 */
public interface IllnessDao {

	int modifyIllnessByIllnessBean(TbIllness illness) throws SQLException;

	int addIllnwssByIllnessBean(TbIllness illness, TbUser user) throws SQLException;

	int removeIllnessByIllnessId(String illnessId) throws SQLException;

	/**
	 * 获取某条病情记录的全部信息吗，后台管理
	 * @param illnessId
	 * @return
	 * @throws SQLException
	 */
	List<TbIllness> getIllnessById(String illnessId) throws SQLException;

	/**
	 * 获取全部病情记录数
	 * @return
	 * @throws SQLException
	 */
	long getCount() throws SQLException;

	/**
	 * 前端分页显示病情记录
	 * @param currentPage
	 * @param pageSize
	 * @param illness
	 * @return
	 * @throws SQLException
	 */
	List<TbIllness> getIllnessBeanList(int currentPage, int pageSize, TbIllness illness) throws SQLException;

	/**
	 * 获取全部病害信息，分页显示，后天管理
	 * @param currentPage
	 * @param pageSize
	 * @return
	 * @throws SQLException
	 */
	List<TbIllness> getIllnessDetailBeanList(Integer currentPage, Integer pageSize) throws SQLException;

	/**
	 * 关键字搜索，返回结果数
	 * @param word
	 * @return
	 * @throws SQLException
	 */
	Long searchPestCountByWord(String word) throws SQLException;
	
	/**
	 * 关键字搜索，后台管理
	 * @param currentPage
	 * @param pageSize
	 * @param word
	 * @return
	 * @throws SQLException
	 */
	List<TbIllness> searchPestByWord(Integer currentPage, Integer pageSize, String word) throws SQLException;

	/**
	 * 批量删除，后台管理
	 * @param ids
	 * @return
	 * @throws SQLException
	 */
	int[] delSelect(String[] ids) throws SQLException;

}
